<template>
  <div class="app-container">
    <div v-if="userInfo">
      <el-row :gutter="20">
        <!--引用了一个组件，在components/UserCard 显示用户卡片-->
        <el-col :span="6" :xs="24">
          <user-card />
        </el-col>
        <el-col :span="18" :xs="24">
          <el-card>
            <el-tabs v-model="activeTab">
              <!--              组件Account-->
              <el-tab-pane label="修改信息" name="account">
                <account />
              </el-tab-pane>
              <!--              组件reset-pwd-->
              <el-tab-pane label="修改密码" name="ResetPwd">
                <reset-pwd />
              </el-tab-pane>
            </el-tabs>
          </el-card>
        </el-col>

      </el-row>
    </div>
    <!--    页脚-->
    <!--    <el-footer class="footer">-->
    <!--      版权所有 &copy; xxxxxxxx &nbsp;&nbsp;  24小时客户服务热线：400-8879-597-->
    <!--    </el-footer>-->
  </div>
</template>

<script>
import { mapState } from 'vuex'
import UserCard from './components/UserCard'
import ResetPwd from './components/ResetPwd'
import Account from './components/Account'

export default {
  name: 'Profile',
  components: { UserCard, Account, ResetPwd },
  data() {
    return {
      activeTab: 'account'
    }
  },
  computed: {
    ...mapState({
      userInfo: state => state.user.userInfo
    })
  },
  created() {
  },
  methods: {

  }

}

</script>
